<?php
use Managers\Auto,
    Managers\Search,
    Managers\Ad;
/**
 * Controller description
 * @since   7 мая 2010
 * @author diotheos
 */
class NewsController extends Zend_Controller_Action
{
    /**
     * @var Zend_Cache_Core
     */
    private $_cache;


    public function init()
    {
        $this->_helper->layout()->setLayout('index-layout');
    }
    public function indexAction(){
        $catalog = new Managers\Catalog();
        $this->view->news = $catalog->getList();
        $this->view->test = 'index';
        //$zapros=$catalog->zapros(20);

    }

    public function viewAction(){
        $id=$this->_getParam("id");
        $newsManager = new \Managers\News();
        $this->view->info = $newsManager->getNews($id);
        $this->view->author=$newsManager->getAutors($id);


            }

    public function editAction(){
        $this->view->test = 'edit';
    }

    }
